import { Entity, Column, Unique, PrimaryGeneratedColumn } from 'typeorm';

@Entity('admin_user')
export class UserEntity {
    @PrimaryGeneratedColumn()
    id: number;

    @Column()
    @Unique(['username'])
    username: string;

    @Column()
    password: string;

    @Column({
        comment: '头像',
        default: '',
    })
    avatar: string;

    @Column({
        comment: '角色',
        default: '',
    })
    role: string;

    @Column({
        comment: '昵称',
        default: '',
    })
    nickname: string;

    @Column({
        comment: '状态 1:正常 0:禁用',
        default: 1,
    })
    active: number;
}
